from fastapi import FastAPI
from fastapi_offline import FastAPIOffline

app = FastAPIOffline()


@app.get("/")
async def root():
    return {"message": "Hello World"}


@app.get("/Agent/chat/{message}")
async def chat(message: str):
    return {"data": "用户消息："+message}

@app.get("/Agent/closeChat/")
async def close_chat():
    return {"data": "结束用户对话："+"-完成"}

if __name__ == '__main__':
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8001)
